import { queryFakeList, deleteTableData, export_list, export_model } from '../services/api';

export default {
  namespace: 'model',

  state: {
    modelList: [],
  },

  effects: {
    //查询模态框的数据
    *queryModel({ payload, url }, { call, put }) {
      const response = yield call(export_model, payload, url);
      yield put({
        type: 'queryModelData',
        payload: response,
      });
    }
  },

  reducers: {
    //查询模态框的数据
    queryModelData(state, action) {
      return {
        ...state,
        list: action.payload,
      };
    },
  },
};
